<%--
  Created by IntelliJ IDEA.
  User: wsl
  Date: 2021/10/8
  Time: 23:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%--
    文件上传的三要素：
         1.表单提交必须是 post
         2.表单的enctype属性必须是：multipart/form-data
         3.表单中必须要有文件上传项
 --%>
<form method="post" enctype="multipart/form-data" action="${pageContext.request.contextPath}/upload">
    <input type="file" name="upload"/><br/>
    <input type="text" name="name"/>
    <input type="text" name="password"/>

    <input type="submit" value="文件上传"/>
</form>
<img src="/upload/468f282a26434e868cb614a4bc7b0668_8541509.jpg">
</body>
</html>
